{template 'common/header-base'}
{if user_is_vice_founder($_W['uid']) && $_W['iscontroller']}
{template 'common/header-vice'}
{else}
<div class="skin-2 {if !$_W['iscontroller']}skin-2--full{/if}" data-skin="2">
	{if $_GPC['c'] == 'home' && in_array($_GPC['do'], array('system_home', 'system'))}
	<div class="skin-2__left js-home-menu">
	{else}
	<div class="skin-2__left {if !$_GPC['jsMenuLock']}skin-2__left--small{/if}">
	{/if}
		<!-- logo -->
		<a class="skin-2__logo" href="{if $_W['iscontroller']}{php echo url('home/welcome/system', array('page' => 'home'))}{else}{php echo $_W['siteroot'] . 'web/home.php'}{/if}">
			<img src="{if !empty($_W['setting']['copyright']['blogo'])}{php echo to_global_media($_W['setting']['copyright']['blogo'])}{else}./resource/images/logo/logo.png{/if}" class="logo" style="max-height: 40px;max-width: 100px;">
		</a>
		<!-- end logo-->
		<!-- 一级菜单 -->
		<ul class="main-nav">
			{template 'common/header-topnav'}
		</ul>
		<!-- end一级菜单 -->
		<a href="javascript:;" class="js-lock-menu skin-2__lock {if $_GPC['jsMenuLock']}lock{/if}">
			<div class="unlock" data-toggle="tooltip" data-placement="right" data-container="body" title="菜单锁定">
				<i class="wi wi-appjurisdiction"　></i> 
			</div>
			<div class="locked" data-toggle="tooltip" data-placement="top" data-container="body" title="点击解锁">
				菜单已锁定
			</div>
		</a>
	</div>
	<div class="skin-2__right">
		<div class="skin-2__header">
			<div class="shortcut pull-left dropdown ">
				<div class="shortcut-header" data-target="#" data-toggle="dropdown" ><i class="wi wi-menu-setting"></i>菜单</div>
				<ul class="shortcut-list ">
					<li class="shortcut-item">
						{loop $top_nav_shortcut $nav}
						<div class="parent">
							<a href="{if empty($nav['url'])}{php echo url('home/welcome/' . $nav['name']);}{else}{$nav['url']}{/if}" {if !empty($nav['blank'])}target="_blank"{/if}>
								<i class="{$nav['icon']} icon"></i>{$nav['title']}
							</a>
						</div>
						{/loop}
					</li>
					{php $shortcut_menu = system_shortcut_menu()}
					{loop $shortcut_menu $menu}
					{if !empty($menu['section'])}
					<li class="shortcut-item">
						<div class="parent">
							<a href="{$menu['url']}">
								<i class="{$menu['icon']} icon"></i>{$menu['title']}
							</a>
						</div>
						<div class="child">
							{loop $menu['section'] $section}
								{if !isset($section['is_display']) || !empty($section['is_display'])}
									{loop $section['menu'] $nav}
										{if !empty($nav['is_display'])}
										<div class="item text-over">
											<a href="{$nav['url']}">
												<i class="{$nav['icon']} icon"></i>{$nav['title']}
											</a>
										</div>
										{/if}
									{/loop}
								{/if}
							{/loop}
						</div>
					</li>
					{/if}
					{/loop}
				</ul>
				<div class=""></div>
			</div>
			{if !$_W['iscontroller']}
			<div class="header-info-common pull-left">
				<a class="header-info-common__logo" href="{php echo $_W['siteroot'] . 'web/home.php'}">
					<img src="{if !empty($_W['setting']['copyright']['blogo'])}{php echo to_global_media($_W['setting']['copyright']['blogo'])}{else}./resource/images/logo/logo.png{/if}" class="logo" style="max-height: 40px;max-width: 100px;">
				</a>
				{if $_W['breadcrumb']}
				<div class="header-info-common__breadcrumb">
					<a href="{$_W['siteroot']}web/home.php" class="home">
						<i class="wi wi-home"></i>
					</a>
					<span class="separator"> <i class="wi wi-angle-right"></i> </span>
					<div class="item">{$_W['breadcrumb']}</div>
				</div>
				{/if}
			</div>
			{/if}
			{if !empty($_W['uid'])}
			<ul class="user-info">
				{template 'common/header-user'}
			</ul>
			{else}
			<ul class="user-info">
				<li class="dropdown"><a href="{php echo url('user/register');}">注册</a></li>
				<li class="dropdown"><a href="{php echo url('user/login');}">登录</a></li>
			</ul>
			{/if}
		</div>
		<div class="skin-2__content main">
			{if !defined('IN_MESSAGE')}
				{if $frames['dimension'] == 3 && in_array(FRAME, array('account', 'system', 'advertisement', 'wxapp', 'site', 'webapp', 'phoneapp')) && !in_array($_GPC['a'], array('news-show', 'notice-show', 'notice-news'))}
				<div class="skin-2__sub">
					<div class="sub-top">
						<!-- 模块信息 -->
						{if !empty($_GPC['m']) && !in_array($_GPC['m'], array('keyword', 'special', 'welcome', 'default', 'userapi', 'service', 'apply')) || defined('IN_MODULE') && IN_MODULE != ''}
						<div class="apply-fixed-top">
							{template 'common/header-module'}
						</div>
						<!-- 模块信息 -->
						{else}
						<div class="left-menu-top-panel">
							{template 'common/header-' . FRAME}
						</div>
						{/if}
					</div>
					
					<!-- 二级菜单-->
					<div class="js-menu" id="js-menu-{FRAME}{$_W['account']['uniacid']}">
					{loop $frames['section'] $frame_section_id $frame_section}
						
						{if !isset($frame_section['is_display']) || !empty($frame_section['is_display'])}
						<div class="panel panel-menu">
							{if $frame_section['title']}
							<div class="panel-heading">
								<span class="{if $_GPC['menu_fold_tag:'.$frame_section_id] == 1}collapsed{/if}" data-toggle="collapse" data-target="#frame-{$frame_section_id}" onclick="util.cookie.set('menu_fold_tag:{$frame_section_id}', util.cookie.get('menu_fold_tag:{$frame_section_id}') == 1 ? 0 : 1)">
									<span class="nav-title">{$frame_section['title']}<i class="wi wi-angle-down pull-right setting"></i></span>
								</span>
							</div>
							{/if}
							<ul class="list-group collapse {if $_GPC['menu_fold_tag:'.$frame_section_id] == 0}in{/if}" id="frame-{$frame_section_id}" >
								{loop $frame_section['menu'] $menu_id $menu}
									{if !empty($menu['is_display'])}
										{if $menu_id == 'platform_module_plugin_more' || $menu_id == 'platform_module_more'}
										<li class="list-group-item">
											<a href="{php echo $menu['url']}" class="text-over">
												<span class="nav-icon" ><span class="icon-more"><i class="wi wi-plus"></i></span></span>
												<span class="nav-title">{$menu['title']}</span>
											</a>
										</li>
										{else}
										{if $menu['active']}{php $active_sub_permission = $menu['sub_permission'];}{/if}
										<li class="list-group-item list-group-item-plugin {if $menu['multilevel']}list-group-item-more{/if} {if $menu['active']}active{/if}">
											{if $frame_section_id == 'platform_module_plugin' && !empty($_GPC['m']) && $_GPC['m'] != $menu['main_module']}
											<a class="back" href="{php echo url('module/welcome', array('m' => $menu['main_module'], 'uniacid' => $_W['uniacid']))}" >
												<i class="wi wi-angle-left"></i>
											</a>
											{/if}
											<a href="{if $menu['multilevel']}javascript:;{else}{$menu['url']}{/if}" {if $menu['multilevel']}data-toggle="collapse" data-target="#frame-child-{$frame_section_id}-{$menu_id}"{/if} class="text-over" {if $frame_section_id == 'platform_module'}target="_blank"{/if}>
												<span class="nav-icon" >
													{if $frame_section_id == 'platform_module' || $frame_section_id == 'platform_module_plugin'}
													<img src="{$menu['icon']}"/>
													{else}
													<i class="{$menu['icon']}"></i>
													{/if}
												</span>
												<span class="nav-title">{$menu['title']}{if $menu['multilevel']}<i class="wi wi-angle-down pull-right setting"></i>{/if}</span>
											</a>
											{if $menu['multilevel'] && !empty($menu['childs'])}
											<ul class="list-child collapse in" id="frame-child-{$frame_section_id}-{$menu_id}">
												{loop $menu['childs'] $module_menu_child}
												<li class="list-child-item {if $module_menu_child['active']}active{/if}">
													<a href="{$module_menu_child['url']}" class="text-over">
														<span class="nav-title">{$module_menu_child['title']}</span>
													</a>
												</li>
												{/loop}
											</ul>
											{/if}
										</li>
										{/if}
									{/if}
								{/loop}
							</ul>
						</div>
						{/if}
					{/loop}
					</div>
					<!-- end二级菜单-->
				</div>
				{/if}
				<div class="skin-2__container container">
						<div class="content">
						{if !empty($_W['page']['title']) && $frames['title'] != '首页' && !empty($frames['title']) && !defined('IN_MODULE') && $_W['iscontroller']}
							<div class="we7-page-title">{$_W['page']['title']}</div>
						{/if}
						{if $frames['dimension'] == 2}
							<!-- start用户管理菜单和消息管理菜单特殊,走自己的we7-page-tab,故加此if判断;平台/应用/我的账户无we7-page-table -->
							{if !in_array(FRAME, array('user_manage', 'message', 'platform', 'module', 'myself', 'workorder'))}
							<ul class="we7-page-tab">
								{php $have_right_content_menu = 0;}
								{loop $frames['section'][FRAME]['menu'] $menu_id $menu}
									{if in_array(FRAME, array('account_manage', 'permission'))}
									{if permission_check_account_user('see_' . $menu['permission_name'])}
									<li class="{if $menu['active']}active{/if}"><a href="{$menu['url']}">{$menu['title']}</a></li>
									{/if}
									{else}
									<li class="{if $menu['active']}active{/if}">
										<a href="{$menu['url']}">
											{$menu['title']}
											<!-- start应用管理中未安装应用数量 -->
											{if FRAME == 'module_manage' && $menu_id == 'module_manage_not_installed'}<span class="color-red"> ({$module_uninstall_total}) </span>{/if}
											<!-- end应用管理中未安装应用数量 -->
										</a>
									</li>
									{/if}
									{if $menu['active']}{php $have_right_content_menu = 1;}{/if}
								{/loop}
							</ul>
							<script>
								$(function(){
									{if empty($have_right_content_menu)}
										$('.we7-page-tab, .we7-page-title').addClass('hidden');
									{/if}
								});
							</script>
							{/if}
							<!-- end用户管理菜单和消息管理菜单特殊,走自己的we7-page-tab;平台/应用/我的账户无we7-page-table -->
						{/if}
			{/if}
{/if}